<%@ taglib prefix="iwebmvc" uri="http://tags.iwebmvc.com" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt" %>
<c-rt:set var="totalProjects" value="<%= org.internna.iwebjtracker.services.ActivityReporter.TOTAL_PROJECTS %>" />
<c-rt:set var="totalDevelopers" value="<%= org.internna.iwebjtracker.services.ActivityReporter.TOTAL_DEVELOPERS %>" />
<c-rt:set var="activityClass" value="<%= org.internna.iwebjtracker.model.Activity.class %>" />
<c-rt:set var="activityReporter" value="<%= org.internna.iwebjtracker.spring.mvc.IWebJTrackerModelDecoratorInterceptor.ACTIVITY_REPORTER %>" />
<c:set var="statistics" value="${requestScope[activityReporter].projectsStatisticsForCurrentUser}" />
<c:set var="openClosed" value="${requestScope[activityReporter].openClosedIssuesForCurrentUserProjects}" />
<iwebmvc:panel title="ui.myprojects.statistics" width="98%;margin:0" cssStyle="text-align:left">
    <table style="text-align:left;width:95%">
        <tbody>
            <tr>
                <td style="font-weight:bold"><iwebmvc:message argMessage="ui.myprojects.statistics.totalprojects" /></td>
                <td>${statistics[totalProjects]}</td>
            </tr>
            <tr>
                <td style="font-weight:bold"><iwebmvc:message argMessage="ui.myprojects.statistics.totaldeveloper" /></td>
                <td>${statistics[totalDevelopers]}</td>
            </tr>
        </tbody>
    </table>
</iwebmvc:panel>
<div class="panelSeparator"></div>
<iwebmvc:panel title="ui.chart.openclosed" width="99%;margin:0;padding:0" cssStyle="text-align:left">
    <div id="openClosedChartContainer" style="height:150px;padding-top:5px;margin:0;width:100%;overflow:hidden"></div>
</iwebmvc:panel>
<div class="panelSeparator"></div>
<iwebmvc:panel title="ui.myprojects.pending" width="99%;margin:0;padding:0" cssStyle="text-align:left">
    <div id="pendingIssuesContainer"></div>
</iwebmvc:panel>
<script type="text/javascript">
    dojo.addOnLoad(function () {
        loadPendingIssues("<iwebmvc:message argMessage="ui.myprojects.pending.none" />");
        if (${openClosed == null}) byId("openClosedChartContainer").innerHTML = "<iwebmvc:message argMessage="ui.chart.openclosed.open.nodata" />";
        else openClosed('<iwebmvc:message argMessage="ui.chart.openclosed.open" />', '<iwebmvc:message argMessage="ui.chart.openclosed.closed" />', "${openClosed["cht"]}", "${openClosed["chd"]}", "${openClosed["chxt"]}", "${openClosed["chxl"]}", "${openClosed["chxp"]}", "${openClosed["chxr"]}");
    });
</script>